home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 4.00 Begin VB.Form frmItemProp BorderStyle = 3 'Fixed Dialog Caption = "Properties" ClientHeight = 6210 ClientLeft = 1560 ClientTop = 405 ClientWidth = 6210 Height = 6615 Left = 1500 LinkTopic = "Form2" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 6210 ScaleWidth = 6210 ShowInTaskbar = 0 'False Top = 60 Width = 6330 Begin VB.OptionButton OptionFont Caption = "Font MS Serif Italic" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 285 Index = 2 Left = 150 TabIndex = 40 Top = 5880 Width = 3045 End Begin VB.OptionButton OptionFont Caption = "Font Courier 10 Underline" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "Courier New" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Index = 1 Left = 150 TabIndex = 39 Top = 5580 Width = 3045 End Begin VB.OptionButton OptionFont Caption = "Font Arial 8 Normal " BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "Arial" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Index = 0 Left = 150 TabIndex = 38 Top = 5310 Width = 2505 End Begin VB.CheckBox CheckRigid Alignment = 1 'Right Justify Caption = "Rigid link" Height = 255 Left = 4350 TabIndex = 37 Top = 3240 Width = 1635 End Begin VB.Frame FrameNodePicture Caption = "Node picture" Height = 1425 Left = 4350 TabIndex = 32 Top = 1140 Width = 1665 Begin VB.OptionButton OptionPicture Caption = "None" Height = 270 Index = 0 Left = 120 TabIndex = 36 Top = 210 Width = 1395 End Begin VB.OptionButton OptionPicture Caption = "Server" Height = 270 Index = 3 Left = 120 TabIndex = 35 Top = 1080 Width = 1395 End Begin VB.OptionButton OptionPicture Caption = "MAC client" Height = 270 Index = 2 Left = 120 TabIndex = 34 Top = 810 Width = 1395 End Begin VB.OptionButton OptionPicture Caption = "PC client" Height = 270 Index = 1 Left = 120 TabIndex = 33 Top = 510 Width = 1395 End End Begin VB.ComboBox ComboArrowOrg Height = 315 ItemData = "Itemprop.frx":0000 Left = 1530 List = "Itemprop.frx":001F Style = 2 'Dropdown List TabIndex = 28 Top = 1860 Width = 2415 End Begin VB.ComboBox ComboArrowDst Height = 315 ItemData = "Itemprop.frx":00CD Left = 1530 List = "Itemprop.frx":00EC Style = 2 'Dropdown List TabIndex = 27 Top = 2220 Width = 2415 End Begin VB.ComboBox ComboLinkStyle Height = 315 ItemData = "Itemprop.frx":019A Left = 1530 List = "Itemprop.frx":01A4 Style = 2 'Dropdown List TabIndex = 26 Top = 2580 Width = 2415 End Begin VB.TextBox TextDrawWidth Height = 315 Left = 1530 TabIndex = 3 Top = 3330 Width = 525 End Begin VB.Frame FrameUserData Caption = "User Data" Height = 2055 Left = 3030 TabIndex = 17 Top = 3480 Width = 3015 Begin VB.TextBox Text3 Height = 285 Left = 1080 TabIndex = 11 Top = 1650 Width = 1065 End Begin VB.TextBox Text1 Height = 555 Left = 570 MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 9 Top = 300 Width = 2325 End Begin VB.TextBox Text2 Height = 555 Left = 570 MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 10 Top = 960 Width = 2325 End Begin VB.Label Label8 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "User Data:" Height = 195 Left = 180 TabIndex = 24 Top = 1680 Width = 765 End Begin VB.Label Label1 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Text:" Height = 195 Left = 105 TabIndex = 23 Top = 300 Width = 360 End Begin VB.Label Label6 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Tag:" Height = 195 Left = 135 TabIndex = 18 Top = 990 Width = 330 End End Begin VB.CommandButton CommandForeColor Caption = "Fore Color..." Height = 375 Left = 180 TabIndex = 6 Top = 4740 Width = 1305 End Begin VB.CommandButton CommandDrawColor Caption = "Draw Color..." Height = 375 Left = 180 TabIndex = 5 Top = 4320 Width = 1305 End Begin VB.CommandButton CommandFillColor Caption = "Fill Color..." Height = 375 Left = 180 TabIndex = 4 Top = 3900 Width = 1305 End Begin VB.ComboBox ComboDrawStyle Height = 315 ItemData = "Itemprop.frx":01C2 Left = 1530 List = "Itemprop.frx":01DB Style = 2 'Dropdown List TabIndex = 2 Top = 2970 Width = 2415 End Begin VB.CheckBox CheckHiding Alignment = 1 'Right Justify Caption = "Hidden Item" Height = 255 Left = 4350 TabIndex = 8 Top = 2940 Width = 1635 End Begin VB.CheckBox CheckTransparent Alignment = 1 'Right Justify Caption = "Node Transparent" Height = 255 Left = 4350 TabIndex = 7 Top = 2640 Width = 1635 End Begin VB.ComboBox ComboAlignment Height = 315 ItemData = "Itemprop.frx":0241 Left = 1530 List = "Itemprop.frx":0260 Style = 2 'Dropdown List TabIndex = 1 Top = 1500 Width = 2415 End Begin VB.CommandButton Command2 Cancel = -1 'True Caption = "Cancel" Height = 435 Left = 5280 TabIndex = 13 Top = 660 Width = 750 End Begin VB.CommandButton Command1 Caption = "Ok" Default = -1 'True Height = 435 Left = 5280 TabIndex = 12 Top = 180 Width = 750 End Begin VB.ComboBox ComboShape Height = 315 ItemData = "Itemprop.frx":033F Left = 1530 List = "Itemprop.frx":035E Style = 2 'Dropdown List TabIndex = 0 Top = 1140 Width = 2415 End Begin VB.Label Label4 AutoSize = -1 'True Caption = "Origin Arrow:" Height = 195 Left = 180 TabIndex = 31 Top = 1890 Width = 900 End Begin VB.Label Label7 AutoSize = -1 'True Caption = "Destination arrow:" Height = 195 Left = 180 TabIndex = 30 Top = 2250 Width = 1275 End Begin VB.Label Label10 AutoSize = -1 'True Caption = "Link line style:" Height = 195 Left = 180 TabIndex = 29 Top = 2610 Width = 990 End Begin VB.Label Label9 AutoSize = -1 'True Caption = "DrawWidth:" Height = 195 Left = 180 TabIndex = 25 Top = 3360 Width = 840 End Begin VB.Label LabelComment BorderStyle = 1 'Fixed Single BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 795 Left = 180 TabIndex = 22 Top = 180 Width = 3765 End Begin VB.Label LabelForeColor BorderStyle = 1 'Fixed Single Height = 345 Left = 1590 TabIndex = 21 Top = 4740 Width = 345 End Begin VB.Label LabelDrawColor BorderStyle = 1 'Fixed Single Height = 345 Left = 1590 TabIndex = 20 Top = 4320 Width = 345 End Begin VB.Label LabelFillColor BorderStyle = 1 'Fixed Single Height = 345 Left = 1590 TabIndex = 19 Top = 3900 Width = 345 End Begin VB.Label Label5 AutoSize = -1 'True Caption = "DrawStyle:" Height = 195 Left = 180 TabIndex = 16 Top = 3000 Width = 765 End Begin VB.Label Label3 AutoSize = -1 'True Caption = "Text Alignment:" Height = 195 Left = 180 TabIndex = 15 Top = 1530 Width = 1095 End Begin VB.Label Label2 AutoSize = -1 'True Caption = "Node Shape:" Height = 195 Left = 180 TabIndex = 14 Top = 1170 Width = 945 End Attribute VB_Name = "frmItemProp" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Dim PicNum% Dim FontNum% Private Sub Command1_Click() With frmMain.ActiveForm.AddFlow1 If .SelectedNode Is Nothing And .SelectedLink Is Nothing Then ' No current item .FillColor = LabelFillColor.BackColor .ForeColor = LabelForeColor.BackColor .DrawColor = LabelDrawColor.BackColor Set .Font = OptionFont(FontNum).Font .DrawStyle = ComboDrawStyle.ListIndex .DrawWidth = Val(TextDrawWidth) .ArrowDst = ComboArrowDst.ListIndex .ArrowOrg = ComboArrowOrg.ListIndex .LinkStyle = ComboLinkStyle.ListIndex .Hidden = (CheckHiding.Value = 1) .Transparent = (CheckTransparent.Value = 1) .Shape = ComboShape.ListIndex .Alignment = ComboAlignment.ListIndex ElseIf .SelectedLink Is Nothing Then ' Current node .SelectedNode.DrawColor = LabelDrawColor.BackColor .SelectedNode.ForeColor = LabelForeColor.BackColor .SelectedNode.Text = Text1 .SelectedNode.Tag = Text2 .SelectedNode.UserData = Val(Text3) .SelectedNode.DrawStyle = ComboDrawStyle.ListIndex .SelectedNode.DrawWidth = Val(TextDrawWidth) .SelectedNode.Hidden = (CheckHiding.Value = 1) Set .SelectedNode.Font = OptionFont(FontNum).Font .SelectedNode.Transparent = (CheckTransparent.Value = 1) .SelectedNode.Shape = ComboShape.ListIndex .SelectedNode.Alignment = ComboAlignment.ListIndex .SelectedNode.FillColor = LabelFillColor.BackColor If PicNum = 0 Then Set .SelectedNode.Picture = Nothing Else Set .SelectedNode.Picture = frmMain.ActiveForm.Picture1(PicNum).Picture End If Else .SelectedLink.DrawColor = LabelDrawColor.BackColor .SelectedLink.ForeColor = LabelForeColor.BackColor .SelectedLink.Text = Text1 .SelectedLink.Tag = Text2 .SelectedLink.UserData = Val(Text3) .SelectedLink.DrawStyle = ComboDrawStyle.ListIndex .SelectedLink.LinkStyle = ComboLinkStyle.ListIndex .SelectedLink.DrawWidth = Val(TextDrawWidth) .SelectedLink.Hidden = (CheckHiding.Value = 1) .SelectedLink.Rigid = (CheckRigid.Value = 1) Set .SelectedLink.Font = OptionFont(FontNum).Font .SelectedLink.ArrowDst = ComboArrowDst.ListIndex .SelectedLink.ArrowOrg = ComboArrowOrg.ListIndex End If End With Unload Me End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub CommandDrawColor_Click() LabelDrawColor.BackColor = frmColors.SelectColor(LabelDrawColor.BackColor) End Sub Private Sub CommandFillColor_Click() LabelFillColor.BackColor = frmColors.SelectColor(LabelFillColor.BackColor) End Sub Private Sub CommandForeColor_Click() LabelForeColor.BackColor = frmColors.SelectColor(LabelForeColor.BackColor) End Sub Private Sub Form_Load() Dim f As Font With frmMain.ActiveForm.AddFlow1 If .SelectedNode Is Nothing And .SelectedLink Is Nothing Then FrameUserData.Visible = False LabelComment.Caption = "No current item: therefore property settings are persistent. Next created items will received those property values by default." Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False CheckRigid.Enabled = False ComboArrowDst.ListIndex = .ArrowDst ComboArrowOrg.ListIndex = .ArrowOrg ComboLinkStyle.ListIndex = .LinkStyle If .Transparent Then CheckTransparent.Value = 1 Else CheckTransparent.Value = 0 End If ComboShape.ListIndex = .Shape ComboAlignment.ListIndex = .Alignment LabelFillColor.BackColor = .FillColor If .Hidden Then CheckHiding.Value = 1 Else CheckHiding.Value = 0 End If ComboDrawStyle.ListIndex = .DrawStyle LabelDrawColor.BackColor = .DrawColor LabelForeColor.BackColor = .ForeColor TextDrawWidth = Str(.DrawWidth) Set f = .Font ElseIf .SelectedNode Is Nothing Then ' Selected link LabelComment.Caption = "The current item is a link. ""Node-only"" properties are disabled. Property settings will apply only to this current link." Text1 = .SelectedLink.Text Text2 = .SelectedLink.Tag Text3 = Str(.SelectedLink.UserData) ComboDrawStyle.ListIndex = .SelectedLink.DrawStyle TextDrawWidth = Str(.SelectedLink.DrawWidth) LabelDrawColor.BackColor = .SelectedLink.DrawColor LabelForeColor.BackColor = .SelectedLink.ForeColor If .SelectedLink.Hidden Then CheckHiding.Value = 1 Else CheckHiding.Value = 0 End If If .SelectedLink.Rigid Then CheckRigid.Value = 1 Else CheckRigid.Value = 0 End If ComboShape.Enabled = False ComboAlignment.Enabled = False ComboArrowDst.ListIndex = .SelectedLink.ArrowDst ComboArrowOrg.ListIndex = .SelectedLink.ArrowOrg ComboLinkStyle.ListIndex = .SelectedLink.LinkStyle CommandFillColor.Enabled = False CheckTransparent.Enabled = False Set f = .SelectedLink.Font Else LabelComment.Caption = "The current item is a node. ""Link-only"" properties are disabled. Property settings will apply only to this current node." Text1 = .SelectedNode.Text Text2 = .SelectedNode.Tag Text3 = Str(.SelectedNode.UserData) ComboDrawStyle.ListIndex = .SelectedNode.DrawStyle TextDrawWidth = Str(.SelectedNode.DrawWidth) LabelDrawColor.BackColor = .SelectedNode.DrawColor LabelForeColor.BackColor = .SelectedNode.ForeColor If .SelectedNode.Hidden Then CheckHiding.Value = 1 Else CheckHiding.Value = 0 End If If .SelectedNode.Transparent Then CheckTransparent.Value = 1 Else CheckTransparent.Value = 0 End If ComboLinkStyle.Enabled = False ComboArrowOrg.Enabled = False ComboArrowDst.Enabled = False ComboShape.ListIndex = .SelectedNode.Shape ComboAlignment.ListIndex = .SelectedNode.Alignment LabelFillColor.BackColor = .SelectedNode.FillColor Set f = .SelectedNode.Font ' Setting node picture If .SelectedNode.Picture Is Nothing Then OptionPicture(0) = True ElseIf .SelectedNode.Picture = frmMain.ActiveForm.Picture1(1).Picture Then OptionPicture(1) = True ElseIf .SelectedNode.Picture = frmMain.ActiveForm.Picture1(2).Picture Then OptionPicture(2) = True ElseIf .SelectedNode.Picture = frmMain.ActiveForm.Picture1(3).Picture Then OptionPicture(3) = True End If CheckRigid.Enabled = False End If ' Item Font If f = OptionFont(0).Font Then OptionFont(0) = True ElseIf f = OptionFont(1).Font Then OptionFont(1) = True ElseIf f = OptionFont(2).Font Then OptionFont(2) = True End If End With End Sub Private Sub OptionFont_Click(Index As Integer) FontNum = Index End Sub Private Sub OptionPicture_Click(Index As Integer) PicNum = Index End Sub